<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>登录成功</title>
  <style>
    /* Reset & Base Styles */
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: linear-gradient(135deg, #e3f2fd, #fce4ec);
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .success-container {
      background: white;
      padding: 40px;
      border-radius: 16px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
      width: 100%;
      max-width: 480px;
      text-align: center;
      animation: fadeIn 0.6s ease-in-out;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-15px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .success-icon {
      width: 60px;
      height: 60px;
      margin: 0 auto 20px;
      background: #1a73e8;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 30px;
    }

    .success-title {
      font-size: 24px;
      font-weight: bold;
      color: #333;
      margin-bottom: 12px;
    }

    .success-message {
      font-size: 16px;
      color: #555;
      margin-bottom: 30px;
    }

    .logout-button {
      display: inline-block;
      padding: 12px 24px;
      background-color: #e0e0e0;
      color: #333;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: bold;
      cursor: pointer;
      transition: background-color 0.3s ease, transform 0.2s ease;
    }

    .logout-button:hover {
      background-color: #cfcfcf;
      transform: translateY(-2px);
    }

    .logout-button:active {
      transform: translateY(0);
    }

    .footer {
      margin-top: 30px;
      font-size: 13px;
      color: #aaa;
    }

    /* Responsive tweaks */
    @media (max-width: 500px) {
      .success-container {
        padding: 30px 20px;
      }
    }
  </style>
</head>
<body>

<div class="success-container">
  <!-- 成功图标 -->
  <div class="success-icon">✅</div>

  <!-- 提示文字 -->
  <h1 class="success-title">登录成功</h1>
  <p class="success-message">您已成功通过登录认证，欢迎使用本系统。</p>

  <!-- 退出登录表单 -->
  <form id="logoutForm" action="/api/v1/logout" method="POST">
    <!-- 可选隐藏字段，例如 csrf token 或用户信息 -->
    <input type="hidden" name="redirectUri" th:value="${redirectUri}"/>
    <input type="hidden" name="code" th:value="${code}"/>
    <input type="hidden" name="_csrf" value="abcxyz123" />

    <!-- 提交按钮 -->
    <button type="submit" class="logout-button">退出登录</button>
  </form>

  <!-- 底部版权 -->
  <div class="footer">
    &copy; 2025 Your Company Name. All rights reserved.
  </div>
</div>

</body>
</html>